package tmall.framework.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tmall.framework.service.IdService;

@Component
public class IdGenerateUtil {
    private static IdService idService;

    private IdGenerateUtil() {
    }

    public static long nextId() {
        return idService.nextId();
    }

    @Autowired
    private void setIdService(IdService idGen) {
        idService = idGen;
    }


}
